package 设计模式.组合模式;

public class Client {
    public static void main(String[] args) {
        //从大到小创建对象
        //学校
        University university = new University("成都信息工程大学", "普通大学");
        //学院
        College computerCollege = new College("计算机学院", "计算机学院");
        College infoEngineerCollege = new College("信息工程学院学院", "信息工程学院");
        university.add(computerCollege);
        university.add(infoEngineerCollege);
        //创建各个学院下面的系(专业)
        computerCollege.add(new Department("软件工程","软件"));
        computerCollege.add(new Department("网络工程","软件"));
        computerCollege.add(new Department("计算机科学与技术","计算机"));
        //信息工程
        infoEngineerCollege.add(new Department("通信工程","通信工程不好学"));
        infoEngineerCollege.add(new Department("信息工程","信息工程很好学"));

        university.print();

//        computerCollege.print();
    }
}
